import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/style/resect.css'
import BaiduMap from 'vue-baidu-map'
import echarts from 'echarts'
import {Loading} from 'element-ui'
import './assets/font_pjndg5tamdg/iconfont.css'
import Axios from 'axios'
Axios.defaults.withCredentials = true;

Vue.config.productionTip = false
Vue.use(BaiduMap, {
  ak: 'VjNz8jH5uVjKkFqoXAvgjBApeijc0eKk'
})
Vue.prototype.$echarts = echarts;
Vue.prototype.$http = Axios;
Vue.prototype.openLoading = function() {
  const loading = Loading.service({
    lock: true,
    text: '正在加载...',
    spinner: 'el-icon-loading',
    background: '#F1F3F4',
    target: '.sub-main',
    body: true,
    customClass: 'mask'
  })
  setTimeout(function() {
    loading.close();
  },3000)
  return loading;
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
